package com.flyduck.vueshop.user.feign;

import com.flyduck.vueshop.common.core.lang.Result;
import com.flyduck.vueshop.user.fallback.RemoteAddressFallback;
import com.flyduck.vueshop.user.fallback.RemoteUserFallback;
import com.flyduck.vueshop.user.vo.RemoteAddressRespVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * AppUserFeignClient
 * </p>
 *
 * @author flyduck
 * @since 2024-07-10
 */
@FeignClient(name = "vueshop-service-user",contextId = "remoteAddressFeignClient",fallback = RemoteAddressFallback.class)
public interface RemoteAddressFeignClient {
    @GetMapping("/user/remote/address/getDefaultAddressByUserId/{userId}")
    Result<RemoteAddressRespVO> getDefaultAddressByUserId(@PathVariable("userId") Long userId);

    @GetMapping("/user/remote/address/getAddressById/{id}")
    Result<RemoteAddressRespVO> getAddressById(@PathVariable("id") Long id);
}
